﻿
<cfscript>
    
    t = CreateObject("component", session.RootDir & ".utilities.Termination").init(109, 0);
    writeDump( t );
    //t.ADDisable();
    //writeDump(t.usePowerShell("dsmove #t.UserDN# -newparent #t.ARCHIVED_USERS_CONTAINER#"));
    /*writeDump( t.usePowerShell('
        $objectlocation= "#t.UserDN#"
        $from = new-object System.DirectoryServices.DirectoryEntry("LDAP://$objectLocation")
        $newlocation = "#t.ARCHIVED_USERS_CONTAINER#"
        $to = new-object System.DirectoryServices.DirectoryEntry("LDAP://$newlocation")
        $from.MoveTo($to.Path)
    ') );*/
    //writeDump(t.ADDisable());
   /* ps = CreateObject("component", "code_lib.SCF_PowerShell");
    scfad = CreateObject("component", "code_lib.SCF_ActiveDirectory");
    dn = scfad.getUserDNByAccountName( 'XXXTriggerTest' );
    /*scfad.replaceAttributesByDN( dn , 'password=Password10!');*/
    /*p = ps.usePowerShell(
    '
    $user = [ADSI]"LDAP://#dn#"
    $user.Invoke("setpassword", "Password10!")
    '
    );
    writeDump(dn);*/

    //Enable-Mailbox -Identity 'XXXEmployee@scf.cc' -Database 'scfexch3\First Storage Group\Mailbox Database' -Alias 'XXXEmployee'
    //writeDump(t);
</cfscript>